using System;
using PathX.Unity;

namespace PathX
{
    public class PathServer : SingleInstanceComponent<PathServer>
    {
        private IPathingEngine _pathingEngine;

        public static PathServer Instance
        {
            get;
            private set;
        }
        protected override void OnAwake()
        {
            base.OnAwake();
            Instance = this;
            _pathingEngine = new AStarPathingEngine(10);
        }

        public void FindPath(IPathRequest request)
        {
            _pathingEngine.ProcessRequest(request);
        }
    }
}